/******************* (C) COPYRIGHT 2022 CHU WEI TENG ***********************************************
**
**------------------ File Info ---------------------------------------------------------------------
** File name:      gui_thread.h
** modified Date:  2022-05-10
** Last Version:   V1.0
** Descriptions: 
** 
**------------------ Modfication  log --------------------------------------------------------------
** Date       Who            Rev        Comments
----------------------------------------------------------------------------------------------------
   22/05/10 chuwt@qq.com    V1.00      created

****************************************************************************************************/
#include "main_windows.h"
#include "dwin_heap.h"
#include "gui_thread.h"

/* Private define----------------------------------------------------------------------------------*/

/* Private typedef---------------------------------------------------------------------------------*/

/* Private variables-------------------------------------------------------------------------------*/
static uint8_t buff[2048];

void gui_thread(void *pvParameters)
{
    uint16_t       page_id = 0;

    dwin_heap_init(buff, sizeo(buff));
    
    dwin_widget_t* main_win = main_windows_create(NULL);
    
    dwin_var_read(DWIN_SYSTEM_VAR_ADDR_CURRENTPAGE, &page_id, 1);
    
    page_id = DWIN_SWAPS(page_id);
    
    dwin_windwos_curr_page_set(main_win, page_id);
    
    while(1)
    {       
        dwin_windows_run(main_win);
        
        dwin_delay(150);
    }
}

